package ru.spb.nicetu.altx.mnemo.extpoint.model.funcs;

public class SimpleFuncFactory implements ISimpleFuncFactory {

  private ISimpleFunc func;

  public SimpleFuncFactory(ISimpleFunc func) {
    this.func = func;
  }

  
  public ISimpleFunc createInstance() {
    try {
      ISimpleFunc funcForCopy = this.func.getClass().newInstance();

      return funcForCopy;
    } catch (InstantiationException e) {
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    }
    return null;
  }

  
  public String getSimpleFuncClassName() {
    return func.getClass().getName();
  }

}
